package com.hsmpay.mobile.pojo.trans;

import com.hsmpay.common.pojo.BasePojo;
import com.hsmpay.common.util.StringCoUtils;
import com.hsmpay.common.util.city.CityUtil;

import java.util.Date;

/**
 * 交易订单
 * java bean
 * 对应 info_Trans_order表
 *
 * @author 颜铃璋
 */
public class TransOrder extends BasePojo {
    private static final long serialVersionUID = -8132330686410430344L;

    private String orderNum;//PK yyyyMMddHHmmss(10位userId)+4位随机数
    private Long orderTypeId;//订单类型ID
    private Long userId;//用户ID
    private Double transMoney = 0.0;//交易金额
    private Double feeMoney = 0.0;//手续费
    private Double chargeAmount = 0.0;//扣款总金额
    private String rootCategory;//类别-大类
    private String category;//category
    private String name;//用户名称 就是注册时  绑定密码时 输入的真实姓名  如果是个人用户  那么可能就是他的手机号
    private String bankCard;//银行卡
    private String openingBank;//银行卡名称
    private String objectiveName;//对方名称
    private String objectiveCard;//对方卡号
    private String objectiveOpBank;//对方银行开户行
    private Integer status;//交易状态  0交易失败 1交易成功 2银行交易处理中 3 未付款 4等待对方付款 5关闭交易 6 交易已撤销 7 交易发起撤销 8 未结算 9 等待审核
    private Integer clearing;//0 DEFAULT未结算 1为结算
    private String description;//描述
    private Date createDate;//创建时间
    private Long updateLongTime;//创建时间 长整型数组   用于排序
    private String signaturePath;//签名（图片）地址
    private String recOrdNum;//收款人 订单ID
    private Long pUserId;//父用户用户ID
    private String branchesBank;//银行支行
    private Integer bBankProvince;
    private Integer bBankCity;
    private String mobile;//手机号
    private Integer objectiveBBProvince;
    private Integer objectiveBBCity;
    private String objectiveBBank;//收款人支行名称
    private String objectiveMobile;//收款人手机号码
    private String x;//对方经度
    private String y;//对方维度
    private Double brokerage;//佣金
    private Double dealerBrokerage;//经销商佣金
    private String branchesBankCode;
    private String objectiveBBankCode;
    private Double revenueFeeMoney = 0.0;//渠道手续费
    private Double receivableMoney = 0.0;//收款金额
    //三毛接口 银行代码
    private String accBankCode;
    private String objectiveAccBankCode;
    private Long terminalTypeId;//终端类型
    private Long roleId;//终端角色ID
    private String orgOrderNum;//原订单号
    private String cashOrderNum;//提现订单号
    private Double feeRate;//用户执行费率
    private Double fdMaxFee;//封顶最高
    private Double fdMinFee;//封顶最低

    private Integer cardTypeN;//刷卡类型  1、磁条卡 2、IC卡
    private Integer machineType;//刷卡器类型

    public Integer getMachineType() {
        return machineType;
    }

    public void setMachineType(Integer machineType) {
        this.machineType = machineType;
    }

    private String idCard;//收款卡身份证
    private String clearMac;
    private String otherData;//其他数据
    private Integer clientType;//客户端类型 1网站 2安卓 3iphone 4ipad 5 大poss  6小poss
    private String transTerminalId;//交易终端ID


    //调用银联接口 要用
    private String bankCardCode;//银行代码
    private String objectiveBCCode;
    private String bBankProvinceStr;
    private String bBankCityStr;
    private Long psId;//收款ID

    //日期区间查询参数
    private Date startDate;
    private Date endDate;
    private String userName;//小票时 需要用到

    private String loginName;//用户登录名

    private String otherParam;//其他查询条件

    private Long organizationId;//提现订单所属允许提现的机构

    private TransPriorSettle transPriorSettle;//收款
    private TransAfterSettle transAfterSettle;//付款

    public TransPriorSettle getTransPriorSettle() {
        return transPriorSettle;
    }

    public void setTransPriorSettle(TransPriorSettle transPriorSettle) {
        this.transPriorSettle = transPriorSettle;
    }

    public TransAfterSettle getTransAfterSettle() {
        return transAfterSettle;
    }

    public void setTransAfterSettle(TransAfterSettle transAfterSettle) {
        this.transAfterSettle = transAfterSettle;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getBBankProvinceStr() {
        return bBankProvinceStr;
    }

    public void setBBankProvinceStr(String bankProvinceStr) {
        bBankProvinceStr = bankProvinceStr;
    }

    public String getBBankCityStr() {
        return bBankCityStr;
    }

    public void setBBankCityStr(String bankCityStr) {
        bBankCityStr = bankCityStr;
    }

    public String getBankCardCode() {
        return bankCardCode;
    }

    public void setBankCardCode(String bankCardCode) {
        this.bankCardCode = bankCardCode;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public Long getOrderTypeId() {
        return orderTypeId;
    }

    public void setOrderTypeId(Long orderTypeId) {
        this.orderTypeId = orderTypeId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Double getTransMoney() {
        return transMoney;
    }

    public void setTransMoney(Double transMoney) {
        this.transMoney = transMoney;
    }

    public Double getFeeMoney() {
        return feeMoney;
    }

    public void setFeeMoney(Double feeMoney) {
        this.feeMoney = feeMoney;
    }

    public Double getChargeAmount() {
        return chargeAmount;
    }

    public void setChargeAmount(Double chargeAmount) {
        this.chargeAmount = chargeAmount;
    }

    public String getRootCategory() {
        return rootCategory;
    }

    public void setRootCategory(String rootCategory) {
        this.rootCategory = rootCategory;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getName() {
        return StringCoUtils.trim(name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBankCard() {
        return StringCoUtils.trim(bankCard);
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public String getOpeningBank() {
        return openingBank;
    }

    public void setOpeningBank(String openingBank) {
        this.openingBank = openingBank;
    }

    public String getObjectiveName() {
        return StringCoUtils.trim(objectiveName);
    }

    public void setObjectiveName(String objectiveName) {
        this.objectiveName = objectiveName;
    }

    public String getObjectiveCard() {
        return StringCoUtils.trim(objectiveCard);
    }

    public void setObjectiveCard(String objectiveCard) {
        this.objectiveCard = objectiveCard;
    }

    public String getObjectiveOpBank() {
        return objectiveOpBank;
    }

    public void setObjectiveOpBank(String objectiveOpBank) {
        this.objectiveOpBank = objectiveOpBank;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getClearing() {
        return clearing;
    }

    public void setClearing(Integer clearing) {
        this.clearing = clearing;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getUpdateLongTime() {
        return updateLongTime;
    }

    public void setUpdateLongTime(Long updateLongTime) {
        this.updateLongTime = updateLongTime;
    }

    public String getSignaturePath() {
        return signaturePath;
    }

    public void setSignaturePath(String signaturePath) {
        this.signaturePath = signaturePath;
    }

    public String getRecOrdNum() {
        return recOrdNum;
    }

    public void setRecOrdNum(String recOrdNum) {
        this.recOrdNum = recOrdNum;
    }

    public Long getPUserId() {
        return pUserId;
    }

    public void setPUserId(Long userId) {
        pUserId = userId;
    }

    public String getObjectiveBCCode() {
        return objectiveBCCode;
    }

    public void setObjectiveBCCode(String objectiveBCCode) {
        this.objectiveBCCode = objectiveBCCode;
    }

    public String getObjectiveBBank() {
        return objectiveBBank;
    }

    public void setObjectiveBBank(String objectiveBBank) {
        this.objectiveBBank = objectiveBBank;
    }

    public String getObjectiveMobile() {
        return objectiveMobile;
    }

    public void setObjectiveMobile(String objectiveMobile) {
        this.objectiveMobile = objectiveMobile;
    }

    public String getX() {
        return x;
    }

    public void setX(String x) {
        this.x = x;
    }

    public String getY() {
        return y;
    }

    public void setY(String y) {
        this.y = y;
    }

    public String getBranchesBank() {
        return branchesBank;
    }

    public void setBranchesBank(String branchesBank) {
        this.branchesBank = branchesBank;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getBBankProvince() {
        return bBankProvince;
    }

    public void setBBankProvince(Integer bankProvince) {
        if (null == bankProvince) {
            bBankProvinceStr = "";
        } else {
            bBankProvinceStr = CityUtil.getNameByValue(bankProvince.toString());
        }
        bBankProvince = bankProvince;
    }

    public Integer getBBankCity() {
        return bBankCity;
    }

    public void setBBankCity(Integer bankCity) {
        if (null == bankCity) {
            bBankCityStr = "";
        } else {
            bBankCityStr = CityUtil.getNameByValue(bankCity.toString());
        }
        bBankCity = bankCity;
    }

    public Integer getObjectiveBBProvince() {
        return objectiveBBProvince;
    }

    public void setObjectiveBBProvince(Integer objectiveBBProvince) {
        this.objectiveBBProvince = objectiveBBProvince;
    }

    public Integer getObjectiveBBCity() {
        return objectiveBBCity;
    }

    public void setObjectiveBBCity(Integer objectiveBBCity) {
        this.objectiveBBCity = objectiveBBCity;
    }

    public Long getPsId() {
        return psId;
    }

    public void setPsId(Long psId) {
        this.psId = psId;
    }

    public Double getBrokerage() {
        return brokerage;
    }

    public void setBrokerage(Double brokerage) {
        this.brokerage = brokerage;
    }

    public Double getDealerBrokerage() {
        return dealerBrokerage;
    }

    public void setDealerBrokerage(Double dealerBrokerage) {
        this.dealerBrokerage = dealerBrokerage;
    }

    public String getBranchesBankCode() {
        return branchesBankCode;
    }

    public void setBranchesBankCode(String branchesBankCode) {
        this.branchesBankCode = branchesBankCode;
    }

    public String getObjectiveBBankCode() {
        return objectiveBBankCode;
    }

    public void setObjectiveBBankCode(String objectiveBBankCode) {
        this.objectiveBBankCode = objectiveBBankCode;
    }

    public String getOtherParam() {
        return otherParam;
    }

    public void setOtherParam(String otherParam) {
        this.otherParam = otherParam;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Double getRevenueFeeMoney() {
        return revenueFeeMoney;
    }

    public void setRevenueFeeMoney(Double revenueFeeMoney) {
        this.revenueFeeMoney = revenueFeeMoney;
    }

    public Double getReceivableMoney() {
        return receivableMoney;
    }

    public void setReceivableMoney(Double receivableMoney) {
        this.receivableMoney = receivableMoney;
    }

    public String getAccBankCode() {
        return accBankCode;
    }

    public void setAccBankCode(String accBankCode) {
        this.accBankCode = accBankCode;
    }

    public String getObjectiveAccBankCode() {
        return objectiveAccBankCode;
    }

    public void setObjectiveAccBankCode(String objectiveAccBankCode) {
        this.objectiveAccBankCode = objectiveAccBankCode;
    }

    public Long getTerminalTypeId() {
        return terminalTypeId;
    }

    public void setTerminalTypeId(Long terminalTypeId) {
        this.terminalTypeId = terminalTypeId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getOrgOrderNum() {
        return orgOrderNum;
    }

    public void setOrgOrderNum(String orgOrderNum) {
        this.orgOrderNum = orgOrderNum;
    }

    public String getCashOrderNum() {
        return cashOrderNum;
    }

    public void setCashOrderNum(String cashOrderNum) {
        this.cashOrderNum = cashOrderNum;
    }

    public Double getFeeRate() {
        return feeRate;
    }

    public void setFeeRate(Double feeRate) {
        this.feeRate = feeRate;
    }

    public Double getFdMaxFee() {
        return fdMaxFee;
    }

    public void setFdMaxFee(Double fdMaxFee) {
        this.fdMaxFee = fdMaxFee;
    }

    public Double getFdMinFee() {
        return fdMinFee;
    }

    public void setFdMinFee(Double fdMinFee) {
        this.fdMinFee = fdMinFee;
    }

    public Integer getCardTypeN() {
        return cardTypeN;
    }

    public void setCardTypeN(Integer cardTypeN) {
        this.cardTypeN = cardTypeN;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getClearMac() {
        return clearMac;
    }

    public void setClearMac(String clearMac) {
        this.clearMac = clearMac;
    }

    public String getOtherData() {
        return otherData;
    }

    public void setOtherData(String otherData) {
        this.otherData = otherData;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public Integer getClientType() {
        return clientType;
    }

    public void setClientType(Integer clientType) {
        this.clientType = clientType;
    }

    public String getTransTerminalId() {
        return transTerminalId;
    }

    public void setTransTerminalId(String transTerminalId) {
        this.transTerminalId = transTerminalId;
    }

    public Long getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Long organizationId) {
        this.organizationId = organizationId;
    }

}
